package customize

import (
	"gitcode.com/G-YT/baoyou/server/middleware"
	"github.com/gin-gonic/gin"
)

type DiseaseRouter struct {
}

func (d *DiseaseRouter) InitDiseaseRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	diseaseRouter := Router.Group("disease").Use(middleware.OperationRecord())
	diseaseRouterWithoutRecord := Router.Group("disease")
	diseaseRouterWithoutAuth := PublicRouter.Group("disease")
	{
		diseaseRouter.POST("createDisease", diseaseApi.CreateDisease)             // 创建病症
		diseaseRouter.DELETE("deleteDisease", diseaseApi.DeleteDisease)           // 删除病症
		diseaseRouter.DELETE("deleteDiseaseByIds", diseaseApi.DeleteDiseaseByIds) // 批量删除病症
		diseaseRouter.PUT("updateDisease", diseaseApi.UpdateDisease)              // 更新病症
		diseaseRouter.POST("setDiseaseArticle", diseaseApi.SetDiseaseArticle)     // 设置病症文章关系
		diseaseRouter.GET("getDiseaseArticle", diseaseApi.GetDiseaseArticle)      // 获取病症文章关系

	}
	{
		diseaseRouterWithoutRecord.GET("findDisease", diseaseApi.FindDisease)       // 根据ID获取病症
		diseaseRouterWithoutRecord.GET("getDiseaseList", diseaseApi.GetDiseaseList) // 获取病症列表
	}
	{
		diseaseRouterWithoutAuth.GET("getDiseaseTypeList", diseaseApi.GetDiseaseTypeList)              // 获取病症类型列表
		diseaseRouterWithoutAuth.POST("getDiseaseListByParentID", diseaseApi.GetDiseaseListByParentID) // 根据ParentID获取病症列表
	}
}
